import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: Text('FlutterDemo')), 
        body: LayoutDemo()
      ));
  }
}

class LayoutDemo extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return Wrap(
      spacing: 11,
      runSpacing: 20,
      children: <Widget>[
        MyButton('第1季'),
        MyButton('第2季'),
        MyButton('第3季'),
        MyButton('第4季'),
        MyButton('第5季'),
        MyButton('第6季'),
        MyButton('第7季'),
        MyButton('第8季'),
        MyButton('第9季'),
        MyButton('第10季')
      ],
    );
  }
}

class MyButton extends StatelessWidget {
  final String text;
  const MyButton(this.text, {Key key}) : super(key: key);
  
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return RaisedButton(
      child: Text(this.text),
      textColor: Theme.of(context).accentColor,
      onPressed: () {},
    );
  }
}